<template>
    <div v-if="IS_ELECTRON" class="header">
      <div class="left">
          
      </div>
      <div class="right">
     
        <span class="el-icon-minus" @click="minimizeWin"></span>
        <span class="el-icon-full-screen" @click="maximizeWin"></span>
        <span class="el-icon-close" @click="closeWin"></span>
      </div>
      
  </div>

</template>

<script>

import { ipcRenderer } from "electron";
import {getPhoneLogin} from "../../api/test/test"

export default {
  name: 'headTop',
  components: {
    
  },
  data(){

    return{
      IS_ELECTRON: process.env.IS_ELECTRON
    }
  },
  mounted(){
    const param = {
      phone:'13531986883',
      password:'wdqb1017'
    }
    // const data = await getPhoneLogin(param);
    // console.log('data',data)
  },
  methods:{
  
     minimizeWin() {
      ipcRenderer.send("window-min");
    },
     maximizeWin() {
      ipcRenderer.send("window-max");
    },
     closeWin() {
      ipcRenderer.send("window-close");
    }
  }
  


}
</script>

<style >

#mytitle {
    position: absolute;
    width: 100%;
    height: 52px;
    background-color: rgb(198, 47, 47);
    -webkit-app-region: drag;
}
.header {
  display: flex;
  justify-content: space-between;

  /* // 允许拖动应用 */
  -webkit-app-region: drag;
  
}
span {
    font-size: 20px;
    margin-right: 20px;
     -webkit-app-region: no-drag;    /*//避免拖动属性导致不能点击 */
  }
</style>
